﻿/******************************************************************************
 * 【本类功能概述】                                 					      *
 *  版权所有（C）2017-20XX，米兔网络                                         *
 *  保留所有权利。                                                            *
 ******************************************************************************
 *  作者 : <hughjk>
 *  创建时间:2018年9月4日 15:30:50
 *  文件描述:数据类
 *****************************************************************************/

namespace BrainSpace
{
    using System;
    using System.Collections.Generic;
    using UnityEngine;

    [Serializable]
    public class GoalData//目标数据
    {
        public int m_id;
        public GoalType m_type;
        public Order m_orderData;
        public GoalInfoCfg m_goalInfo;
        public ActionClusteData m_condition;
        public ActionClusteData m_execute;
    }

    [Serializable]
    public class ActionClusteData//行为组数据
    {
        public ActionsType m_ActionsType;
        public bool IsAll = false;
        public ClusterExecuteType exType;
        public List<ActionData> m_ListData = new List<ActionData>();
    }

    [Serializable]
    public class ActionData//行为数据
    {
        public int m_id;
        public ActionInfoCfg m_data;

        public virtual void Init()
        {
        }
    }

    [Serializable]//执行创建目标
    public class GoalConditionData : ActionData
    {
        public Order order;

        public override void Init()
        {
            order = new Order();
            var vs = m_data.parameter.toIntArr();
            order.m_id = vs[0];
            order.m_GoalId = vs[1];//行为ID
            order.m_type = vs[2];//指令类型
            order.m_source = vs[3];//来源 1主动 2,AI
            order.m_authority = vs[4];//权限
        }
    }

    [Serializable]//监听数据
    public class MonitorData : ActionData
    {
        public Order m_order;

        public override void Init()
        {
            m_order = new Order();
            var vs = m_data.parameter.toIntArr();
            m_order.m_id = vs[0];
            m_order.m_GoalId = vs[1];//行为ID
            m_order.m_type = vs[2];//指令类型
            m_order.m_source = vs[3];//来源 1主动 2,AI
            m_order.m_authority = vs[4];//权限
        }
    }

    [Serializable]
    public class Order
    {
        public int m_id;//id
        public int m_GoalId;//行为ID
        public int m_type;//指令类型
        public int m_source;//来源 1主动 2,AI
        public int m_authority;//权限
    }

    public class OrderAttack : Order
    {
        public Transform AttackObj;
    }

    public class BrainData
    {
    }
}